package com.runen.infinitemovement.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.runen.infinitemovement.R;
import com.runen.infinitemovement.model.entity.ADDataEntity;
import com.runen.infinitemovement.model.entity.AdInfoEntity;
import com.runen.infinitemovement.tool.GlideUtils;
import com.runen.infinitemovement.widget.imageview.RoundedCornersImage;

/**
 * Create by LiaoDuanHong
 * Create on 2021/01/06 20:35
 */
public class AdAdapter extends BaseQuickAdapter<ADDataEntity, BaseViewHolder> implements LoadMoreModule {
    private Context context;

    public AdAdapter(Context context) {
        super(R.layout.item_ad);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, ADDataEntity item) {
        RoundedCornersImage rci_ad = baseViewHolder.getView(R.id.rci_ad);
        GlideUtils.loadImage(context, item.cover, rci_ad);
    }
}
